<template>
    <transition name="fade">
        <div class="dialog-container" v-show="videoDialogVisibal">
            <div class="content-dialog">
                <div class="header-dialog">
                    <div class="title-dialog">{{videoTitle || "视频"}}</div>
                    <div class="close-btn" @click="closeDialog">
                        <i class="iconfont icon-cuowu"></i>
                    </div>
                </div>
                <div class="video">
                    <slot></slot>
                </div>
                <div class="footer">
                    <el-button size="small" class="btn-class" @click="dialogVisible = false">关闭</el-button>
                </div>
            </div>
        </div>
    </transition>
</template>
<style lang="scss">
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-to {
    opacity: 0;
}
.dialog-container {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 999;
    overflow: hidden;
    background: rgba($color: #000000, $alpha: 0.3);
    .content-dialog {
        width: 800px;
        height: 600px;
        margin: 0 auto;
        margin-top: 150px;
        background: #ffffff;
        border-radius: 10px;
        .header-dialog {
            width: 800px;
            height: 54px;
            line-height: 54px;
            text-align: center;
            font-size: 18px;
            color: #303133;
            position: relative;
            .title-dialog {
                width: 800px;
                border-bottom: 1px solid #dcdcdc;
            }
            .close-btn {
                position: absolute;
                top: 0px;
                right: 20px;
                i {
                    font-size: 24px;
                }
            }
        }
        .video {
            width: 100%;
            padding: 30px 20px;
            box-sizing: border-box;
        }
    }
    .footer {
        text-align: center;
    }
}
</style>
<script>
export default {
    data() {
        return {};
    },
    props: ["videoTitle", "videoDialogVisibal"],
    methods: {
        closeDialog() {
            this.videoDialogVisibal = false;
            this.$emit("closeDialogFun", this.videoDialogVisibal);
        }
    }
};
</script>

